<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

<ui:composition>
		<h:form>
			<c:if test="${empty crintListaBean.crintLista}">
				<rich:panel>
					<div align="center">
						<h:graphicImage value="/img/info.gif" />
						<h:outputLabel value="#{resourceApp.crint_sin_info}" />
					</div>
				</rich:panel>
			</c:if>
			<c:if test="${!empty crintListaBean.crintLista}">
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="#{resourceApp.crint_titulo_lista}"></h:outputText>
					</f:facet>	
				<rich:spacer></rich:spacer>
				<rich:spacer></rich:spacer>	
	            <div class="dialog">
	                <h:panelGrid columns="4" cellpadding="0" cellspacing="0" width="100%">
	                	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crint_crmae_maepen}"></h:outputText></b>
	                	</h:panelGroup>
	                	<h:outputText value="#{crintListaBean.crmaeDTO.suma_maepen}">
	                		<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
	                	</h:outputText>
	                	<h:panelGroup>	
	                		<b><h:outputText value="#{resourceApp.crint_crmae_maemip}"></h:outputText></b>
	                	</h:panelGroup>
	                	<h:outputText value="#{crintListaBean.crmaeDTO.maemip}"></h:outputText>
	                	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crint_crest_estpen}"></h:outputText></b>
	                	</h:panelGroup>
	                	<h:outputText id="interesesAnio" value="#{crintListaBean.crestDTO.totalInteresesAnio}">
	                		<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
	                	</h:outputText>
	                	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crint_promedio}"></h:outputText></b>
	                	</h:panelGroup>
	                	<h:outputText id="promedioTotal"  value="#{crintListaBean.crestDTO.promedioInteresesAnio}">
	                		<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
	                	</h:outputText>
	                	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crint_estpen}"></h:outputText></b>
	                	</h:panelGroup>
	                	<h:outputText value="#{crintListaBean.crestDTO.totalIntereses}">
	                		<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
	                	</h:outputText>
	                	<h:panelGroup>
	                		<b><h:outputText value="#{resourceApp.crint_promedio_total}"></h:outputText></b>
	                	</h:panelGroup>
	                	<h:outputText value="#{crintListaBean.crestDTO.promedioIntereses}">
	                		<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
	                	</h:outputText>
	                </h:panelGrid>
	                <rich:spacer height="15"></rich:spacer>
					<rich:spacer></rich:spacer>
					<rich:spacer></rich:spacer>
	        	 </div>
				<rich:spacer></rich:spacer>
				<rich:dataTable value="#{crintListaBean.crintLista}" id="idTablaInteres" rows="10" rowClasses="filas"
				headerClass="headerText" style=" width : 100%;"
				var="listaResultadoTabla" onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
				onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" border="1">
				<rich:column sortBy="#{listaResultadoTabla.intffh}"
					headerClass="encabezadoCol">
					<f:facet name="header">
						<h:outputText value="#{resourceApp.crint_intffh}" />
					</f:facet>
					<h:outputText value="#{listaResultadoTabla.intffh_s}"/>
				</rich:column>
				<rich:column sortBy="#{listaResultadoTabla.intcod}"
					headerClass="encabezadoCol">
					<f:facet name="header">
						<h:outputText value="#{resourceApp.crint_intcod}" />
					</f:facet>
					<h:outputText value="#{listaResultadoTabla.intcod}" />
				</rich:column>
				<rich:column sortBy="#{listaResultadoTabla.descripcion}"
					headerClass="encabezadoCol">
					<f:facet name="header">
						<h:outputText value="#{resourceApp.crint_intdes}" />
					</f:facet>
					<h:outputText value="#{listaResultadoTabla.descripcion}" />
				</rich:column>
				<rich:column sortBy="#{listaResultadoTabla.intvlr}"
					headerClass="encabezadoCol">
					<f:facet name="header">
						<h:outputText value="#{resourceApp.crint_intvlr}" />
					</f:facet>
					<h:outputText value="#{listaResultadoTabla.intvlr}">
						<f:convertNumber currencySymbol="$" maxFractionDigits="2" type="currency"/>
					</h:outputText>
				</rich:column>
				</rich:dataTable>
					<rich:spacer height="30" />
					<rich:datascroller align="center"  for="idTablaInteres" maxPages="20" />
				</rich:panel>
			</c:if>
		</h:form>
</ui:composition>
</html>
